package at.fhooe.obd.gui;



import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import at.fhooe.obd.tasks.GetTracksForUserTask;

public class MainActivity extends Activity
{
	
	private static final String TAG = "OBD_Client";
	private final String USER_ID_TO_LOAD = "userName";
	
	private void loadData()
	{
		GetTracksForUserTask getTracksTask = new GetTracksForUserTask();
		getTracksTask.execute(this, USER_ID_TO_LOAD);
	}
	
	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		loadData();
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu)
	{
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_main, menu);
		return true;
	}
	
	@Override
	protected void onResume()
	{
		super.onResume();
		loadData();
	}
}
